import { RouteRecordRaw, createWebHistory, createRouter } from "vue-router";

const routes : Array<RouteRecordRaw> = [
	
	{
		path: '/',
		name:'Index',
		component: () => import('../views/index/index.vue'),  // 首页组件
		beforeEnter:(to,from,next)=>{
			window.document.body.style.backgroundColor = "#0183b8";
			next();
		}

	},
	{
		path: '/his',
		name:'his',
		component: () => import('../views/his/his.vue'),  
		beforeEnter:(to,from,next)=>{
			window.document.body.style.backgroundColor = "#0183b8";
			next();
		}
	
	},
	
]

const router = createRouter({
	history: createWebHistory(), // 路由类型
	routes // short for `routes: routes`
})




export default router


